from __future__ import division
from random import random as rand, shuffle, uniform, randint
import numpy as np


def make():
    x = rand()
    y = uniform(0, 1 - x)
    res = [x, y, 1 - x - y]
    shuffle(res)
    return res


def make2():
    res = np.array([randint(0, 100) for _ in range(3)])
    return res / sum(res)

res = ['{},{},{}'.format(*make2()) for i in range(10)]
for i in res:
    print i
ten_weights = [[0.8,0.18,0.02], [0.25,0.55,0.2], [0.24,0.61,0.15],
               [0.27,0.19,0.54],[0.51,0.34,0.15], [0.81,0.17,0.02],
               [0.22,0.26,0.52], [0.22,0.21,0.57], [0.39,0.23,0.38],
               [0.41,0.41,0.18]]
print [sum(i) for i in ten_weights]